package com.jinhongone.pattern.creater.factory.abstractFactory;


public class CoffeeStore {

    private Factory factory;

    public void setCoffeeFactory(Factory factory) {
        this.factory = factory;
    }

    public Coffee orderCoffee() {
        Coffee coffee = this.factory.createCoffee();
        coffee.addSugar();
        coffee.addMilk();
        return coffee;
    }

    public Dessert orderDessert() {
        return this.factory.createDessert();
    }
}
